﻿using ShareFrame.Entity.Base_Manage;
using ShareFrame.Entity.DTO;
using ShareFrame.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ShareFrame.IBusiness.Base_Manage
{
    /// <summary>
    /// 文件上传记录接口类
    /// </summary>
    public interface IBase_UploadRecordsBusiness
    {
        /// <summary>
        /// 根据单一条件获取分页结果集
        /// </summary>
        /// <param name="input">传入条件参数</param>
        /// <returns></returns>
        Task<PageResult<Base_UploadRecords>> GetDataListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 根据多条件动态获取分页结果集
        /// </summary>
        /// <param name="basedbOptions">数据库连接</param>
        /// <param name="input">传入条件参数集</param>
        /// <returns></returns>
        Task<PageResult<Base_UploadRecords>> GetDataListAsync(BaseDbOption basedbOptions, PageInput<List<ConditionDTO>> input); 

        /// <summary>
        /// 根据传入Id获取对应实体信息
        /// </summary>
        /// <param name="id">实体唯一编号</param>
        /// <returns></returns>
        Task<Base_UploadRecords> GetTheDataAsync(string id);

        /// <summary>
        /// 基础添加方法
        /// </summary>
        /// <param name="data">要添加的实体信息</param>
        /// <returns></returns>
        Task AddDataAsync(Base_UploadRecords data);

        /// <summary>
        /// 批量添加数据-低性能
        /// </summary>
        /// <param name="list">要添加的实体集合</param>
        /// <returns></returns>
        Task AddDataExlAsync(List<Base_UploadRecords> list);

        /// <summary>
        /// 批量添加数据,速度快
        /// </summary>
        /// <param name="list"></param>
        void BulkInsertInterface(List<Base_UploadRecords> list);

        /// <summary>
        /// 基础更新方法
        /// </summary>
        /// <param name="data">要更新的实体信息</param>
        /// <returns></returns>
        Task UpdateDataAsync(Base_UploadRecords data);

        /// <summary>
        /// 重写更新方法-批量更新方法
        /// </summary>
        /// <param name="basedbOptions">数据库连接字符串对象</param>
        /// <param name="columnName">更新列名</param>
        /// <param name="upValue">更新值</param>
        /// <param name="ids">ID集合</param>
        /// <returns></returns>
        Task UpdateDataAsync(BaseDbOption basedbOptions, string columnName, string upValue, List<string> ids);
        Task UpdateDataAsync(BaseDbOption basedbOptions, string columnName, int upValue, List<string> ids);
        Task UpdateDataAsync(BaseDbOption basedbOptions, string columnName, bool upValue, List<string> ids);

        /// <summary>
        /// 基础删除方法
        /// </summary>
        /// <param name="ids">传入条件参数</param>
        /// <returns></returns>
        Task DeleteDataAsync(List<string> ids);

    }

}